-
Notifications
You must be signed in to change notification settings - Fork 3k
Core: Fix compute_table_stats failures with concurrent writes #15148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
dramaticlly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shall add commit retry like other PendingUpdate implementation class, RemoveSnapshots is a good example. But we can probably simplify the unit test a bit
|
|
||
| // Skip if no changes | ||
| if (base == newMetadata) { | ||
| LOG.info("No statistics changes to commit, skipping"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think debug shall be sufficient here or we can remove it entirely.
dramaticlly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| snapshotId, "/some/statistics/file.puffin", 100, 42, ImmutableList.of()); | ||
|
|
||
| TestTables.TestTableOperations ops = table.ops(); | ||
| ops.failCommits(3); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, I think $maxAttempt+1 would be helpful here like
ops.failCommits(TableProperties.COMMIT_NUM_RETRIES_DEFAULT + 1);There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use
Integer.parseInt(
table.properties().getOrDefault(TableProperties.COMMIT_NUM_RETRIES, "4") + 1 ?
compute_table_stats fails with CommitFailedException when concurrent writes modify table metadata during statistics computation.